import request from '@/utils/request'

// 查询寝室信息列表
export function listDorms(query) {
  return request({
    url: '/students/dorms/list',
    method: 'get',
    params: query
  })
}

// 查询寝室信息详细
export function getDorms(dormsId) {
  return request({
    url: '/students/dorms/' + dormsId,
    method: 'get'
  })
}

// 新增寝室信息
export function addDorms(data) {
  return request({
    url: '/students/dorms',
    method: 'post',
    data: data
  })
}

// 修改寝室信息
export function updateDorms(data) {
  return request({
    url: '/students/dorms',
    method: 'put',
    data: data
  })
}

// 删除寝室信息
export function delDorms(dormsId) {
  return request({
    url: '/students/dorms/' + dormsId,
    method: 'delete'
  })
}
